/**
 * Created by fly on 2017/4/16.
 *
 */
var Q = require('q');
var db = require('../db/connect_pool');

/**
 * 执行sql语句promise
 * @param sql sql语句
 * @param value 参数
 */
exports.doSqlPromise = function (sql,value) {
    var deferred = Q.defer();
    db.query(sql,value,function (result) {
        deferred.resolve(result);
    });
    return deferred.promise;
}
